'''
Dictionary of all constants and text
'''
import pygame;
import spyral;

colors = {}
strings = {}
geom = {}
fonts = {}
images = {}

spyral.init()


colors['bg'] = (0, 0, 0)
colors['score'] = (255, 255, 255)
colors['menu'] = (255, 255, 255)
colors['transparent'] = (255, 0 ,255)
colors['black'] = (0, 0, 0)
colors['grey'] = (125, 125, 125)
colors['white'] = (255, 255, 255)
colors['blue'] =(10,10,210)
colors['red'] = (210, 10, 10)
colors['green'] = (10, 210, 10)


strings['menu_title'] = "Payback Pigs ALPHA"
strings['menu_instructions'] = "Press SPACE to start. Press ESC to quit."
strings['gameover_title'] = "GAME OVER: Return to Base"
strings['gameover_instructions'] = "Press SPACE to play again. Press ESC to quit."


geom['size'] = (960, 640)
geom['width'] = geom['size'][0]
geom['height'] = geom['size'][1]
geom['score_in_height'] = int(.03*geom['height'])
geom['score_font_size'] = int(.08*geom['height'])
geom['menu_title_font_size'] = int(.15*geom['height'])
geom['junk_font_size'] = int(.04*geom['height'])
geom['menu_font_size'] = int(.06*geom['height'])
geom['gameover_score_font_size'] = int(.12*geom['height'])
geom['guidebar_font_size'] = int(.03*geom['height'])


fonts['score'] = pygame.font.SysFont(None, geom['score_font_size'])
fonts['menu'] = pygame.font.SysFont(None, geom['menu_font_size'])
fonts['menu_title'] = pygame.font.SysFont(None, geom['menu_title_font_size'])
fonts['gameover_title'] = pygame.font.SysFont(None, geom['gameover_score_font_size'])
fonts['qdisplay_collect'] = pygame.font.SysFont(None, 30)
fonts['qdisplay_question'] = pygame.font.SysFont(None, 90)


folder = './images/'    #based on where the __main__ file is
'Game'
images['bg1'] = folder + 'bg1.png'
images['bg2'] = folder + 'bg2.png'
images['fg1'] = folder + 'fg1.png'
images['fg2'] = folder + 'fg2.png'
images['birdsmall'] = folder + 'birdsmall.png'
images['pig1'] = folder + 'pig1.png'
images['pig2'] = folder + 'pig2.png'
images['cannonbarrel'] = folder + 'cannonbarrel.png'
images['cannonbarrel2'] = folder + 'cannonbarrel2.png'
images['cannonbase'] = folder + 'cannonbase.png'
images['arrow'] = folder + 'arrow.png'




images['menu_title'] = fonts['menu_title'].render(
                            strings['menu_title'],
                            True,
                            colors['menu'])
images['menu_instructions'] = fonts['menu'].render(
                            strings['menu_instructions'],
                            True,
                            colors['menu'])
images['gameover_title'] = fonts['gameover_title'].render(
                            strings['gameover_title'],
                            True,
                            colors['menu'])
images['gameover_instructions'] = fonts['menu'].render(
                            strings['gameover_instructions'],
                            True,
                            colors['menu'])